<template>
  <div class="main">
    <div class="h3_title wow" style="visibility: visible">
      <h2>精诚施工，让安全与品质并行</h2>
      <h6>业主满意度<span>高达<numberScroll :value="98.5"></numberScroll>%</span>，装修费用<span>直降<numberScroll :value="30"></numberScroll>%</span></h6>
    </div>
    <div class="top1" :class="{ topActive: is_show.show }">
      <div class="select wow" style="visibility: visible">
        <ul>
          <li :class="{ active: is_show.show && show_num == 0 }" @click="upcate(0)">
            <p>户型</p>
            <img
              src=""
            />
          </li>
          <li :class="{ active: is_show.show && show_num == 1 }" @click="upcate(1)">
            <p>面积</p>
            <img
              src=""
            />
          </li>
        </ul>
      </div>
      <ul>
        <li class="active"><p>全部</p></li>
        <li class=""><p>独栋别墅</p></li>
        <li class=""><p>联排别墅</p></li>
        <li class=""><p>大平层</p></li>
        <li class=""><p>复式</p></li>
      </ul>
      <ul style="display: none">
        <li class="active"><p>全部</p></li>
        <li class=""><p>200㎡以下</p></li>
        <li class=""><p>200-500㎡</p></li>
        <li class=""><p>500㎡以上</p></li>
      </ul>
    </div>
    <div class="data wow" style="visibility: visible">
      <ul>
        <li>
          <p>
            <span><numberScroll :value="24"></numberScroll></span>
            年
          </p>
          <p>装饰经验</p>
        </li>
        <li>
          <p>
            <span><numberScroll :value="600"></numberScroll></span>
            户+
          </p>
          <p>在建工地</p>
        </li>
        <li>
          <p>
            <span><numberScroll :value="2000"></numberScroll></span>
            户+
          </p>
          <p>服务家庭</p>
        </li>
      </ul>
    </div>
    <div class="map wow" style="visibility: visible">
      <img src="/src/assets/img/buil_002.png" alt="" />
      <ul>
        <li>
          <div class="circle" style="animation-delay: 0.425942s"></div>
          <img src="/src/assets/img/buil_001.png" alt="" />
        </li>
        <li>
          <div class="circle" style="animation-delay: 0.476802s"></div>
          <img src="/src/assets/img/buil_001.png" alt="" />
        </li>
        <li>
          <div class="circle" style="animation-delay: 0.216211s"></div>
          <img src="/src/assets/img/buil_001.png" alt="" />
        </li>
        <li>
          <div class="circle" style="animation-delay: 0.497577s"></div>
          <img src="/src/assets/img/buil_001.png" alt="" />
        </li>
        <li>
          <div class="circle" style="animation-delay: 0.159285s"></div>
          <img src="/src/assets/img/buil_001.png" alt="" />
        </li>
        <li>
          <div class="circle" style="animation-delay: 0.222662s"></div>
          <img src="/src/assets/img/buil_001.png" alt="" />
        </li>
        <li>
          <div class="circle" style="animation-delay: 0.391596s"></div>
          <img src="/src/assets/img/buil_001.png" alt="" />
        </li>
        <li>
          <div class="circle" style="animation-delay: 0.167554s"></div>
          <img src="/src/assets/img/buil_001.png" alt="" />
        </li>
        <li>
          <div class="circle" style="animation-delay: 0.202292s"></div>
          <img src="/src/assets/img/buil_001.png" alt="" />
        </li>
        <li>
          <div class="circle" style="animation-delay: 0.324076s"></div>
          <img src="/src/assets/img/buil_001.png" alt="" />
        </li>
      </ul>
    </div>
    <div class="h3_title wow" style="visibility: visible">
      <h2>个性化定制装修</h2>
      <h6>业主满意度<span>高达98.5%</span>，装修费用<span>直降30%</span></h6>
    </div>
    <ul class="boxName">
      <li class="buildList wow" style="visibility: visible">
        <swiper
          @slideChange="onSlideChange"
          slidesPerView="auto"
          :loop="true"
          :centeredSlides="true"
        >
          <swiper-slide>
            <div class="imgBox">
              <img
                src="https://www.shbotao.net//uploads/allimg/20211209/c3bd96416dfa614de9520b931cfc1e5f.jpg"
                alt=""
              />
            </div>
          </swiper-slide>
          <swiper-slide>
            <div class="imgBox">
              <img
                src="https://www.shbotao.net//uploads/allimg/20211209/c3bd96416dfa614de9520b931cfc1e5f.jpg"
                alt=""
              />
            </div>
          </swiper-slide>
          <swiper-slide>
            <div class="imgBox">
              <img
                src="https://www.shbotao.net//uploads/allimg/20211209/c3bd96416dfa614de9520b931cfc1e5f.jpg"
                alt=""
              />
            </div>
          </swiper-slide>
          <swiper-slide>
            <div class="imgBox">
              <img
                src="https://www.shbotao.net//uploads/allimg/20211209/c3bd96416dfa614de9520b931cfc1e5f.jpg"
                alt=""
              />
            </div>
          </swiper-slide>
        </swiper>
        <div class="content">
          <div class="top">
            <div class="topLeft">
              <p>城开云外</p>
              <div>
                <p>
                  <i></i>
                  独栋别墅
                </p>
                <!---->
              </div>
            </div>
          </div>
          <div class="bottom">
            <div class="bottomLeft">
              <div class="imgBox2">
                <img
                  src="https://www.shbotao.net//uploads/allimg/20211207/59f8a115ec10f313e3556a02ab90e333.jpg"
                  alt=""
                />
              </div>
              <div class="text">
                <p>设计师</p>
                <p>陆靖浩</p>
              </div>
            </div>
            <div class="button-wrap">
              <div class="btn">预约参观工地</div>
            </div>
          </div>
        </div>
      </li>
      <li class="buildList wow" style="visibility: visible">
        <div class="imgBox">
          <img
            src="https://www.shbotao.net//uploads/allimg/20211213/5329b636befb7c12569a8c5e65670f6b.jpg"
            alt=""
          />
          <img
            src=""
            @click="visible = true"
            alt=""
          />
          <!---->
        </div>
        <div class="content">
          <div class="top">
            <div class="topLeft">
              <p>中海观澜府</p>
              <div>
                <p>
                  <i></i>
                  联排别墅
                </p>
                <p>
                  <i></i>
                  350㎡
                </p>
              </div>
            </div>
          </div>
          <div class="bottom">
            <div class="bottomLeft">
              <div class="imgBox2">
                <img
                  src="https://www.shbotao.net//uploads/allimg/20211213/6fa75caec1947949d0ce15e6a4fa9680.jpg"
                  alt=""
                />
              </div>
              <div class="text">
                <p>设计师</p>
                <p>张严</p>
              </div>
            </div>
            <div class="button-wrap">
              <div class="btn">预约参观工地</div>
            </div>
          </div>
        </div>
      </li>
    </ul>
    <div class="mask" :class="{ maskActive: is_show.show }"></div>
    <el-dialog v-model="visible" width="100%" top="30vh">
      <template #header="">
        <div class="my-header"></div>
      </template>
      <div class="video-box">
          <video controls="controls" :src="video_src" preload="true" muted="muted" >
            <source :src="video_src" type="video/mp4" />
          </video>
        </div>
    </el-dialog>
  </div>
</template>

<script setup>
import { Swiper, SwiperSlide } from 'swiper/vue'

import 'swiper/css'
import { ref } from 'vue'
const onSlideChange = () => {}
const is_show = ref({ show: false, index: 0 })
const show_num = ref(0)
const upcate = (index) => {
  is_show.value.show = !is_show.value.show
  if (is_show.value.index != index) {
    is_show.value.show = true
    is_show.value.index = index
  }
  show_num.value = index
}
const visible = ref(false)
const video_src = ref('')
</script>

<style>
.el-dialog{
    background: unset;
}
.building .main .h3_title {
  opacity: 0;
  animation: slide-up-in 1s, fade-in 1s;
  animation-fill-mode: forwards;
  margin: 0.5rem 0;
}
.building .main .h3_title h2 {
  font-size: 0.46rem;
  color: #000;
  font-weight: 700;
  padding-left: 0.3rem;
}
.building .main .h3_title h6 {
  padding: 0.1rem 0.3rem 0.1rem;
  font-size: 0.25rem;
  color: #999;
}
.building .main .h3_title h6 span {
  color: #db272a;
}
.building .data,
.building .select,
.building .tabs {
  opacity: 0;
  animation: slide-down-in 1s, fade-in 1s;
  animation-fill-mode: forwards;
}
.building .buildList .swiper {
  width: 100%;
}
.building .buildList,
.building .map {
  opacity: 0;
  animation: fade-in 1s;
  animation-fill-mode: forwards;
}

@-webkit-keyframes scale {
  0% {
    transform: scale(0);
    opacity: 0;
  }

  50% {
    opacity: 1;
  }

  to {
    transform: scale(1.5);
    opacity: 0;
  }
}

@keyframes scale {
  0% {
    transform: scale(0);
    opacity: 0;
  }

  50% {
    opacity: 1;
  }

  to {
    transform: scale(1.5);
    opacity: 0;
  }
}

.building .main .top1 {
  width: 7.5rem;
  padding: 0 0.3rem;
  position: absolute;
  top: 11rem;
  z-index: 2;
  height: 0.85rem;
  border-radius: 0 0 0.2rem 0.2rem;
  overflow: hidden;
  transition: all 0.6s;
}

.building .main .top1 .select {
  display: flex;
  margin-top: 0.3rem;
}

.building .main .top1 .select > ul {
  display: flex;
}

.building .main .top1 .select > ul > li {
  display: flex;
  align-items: center;
  cursor: pointer;
  margin-right: 0.86rem;
}

.building .main .top1 .select > ul > li p {
  font-size: 0.3rem;
  color: #000;
  font-weight: 700;
}

.building .main .top1 .select > ul > li img {
  margin-left: 0.1rem;
  width: 0.22rem;
  height: 0.11rem;
  transition: all 0.3s;
}

.building .main .top1 .select > ul .active img {
  transform: rotate(180deg);
}

.building .main .top1 > ul {
  display: flex;
  flex-wrap: wrap;
  margin-top: 0.7rem;
}

.building .main .top1 > ul > li {
  font-size: 0.24rem;
  color: #666;
  margin-bottom: 0.15rem;
  width: 2.3rem;
  text-align: left;
  cursor: pointer;
}

.building .main .top1 > ul > li p {
  transition: all 0.2s;
  white-space: nowrap;
}

.building .main .top1 > ul > li:first-of-type {
  width: 1.9rem;
}

.building .main .top1 > ul > li:nth-of-type(4) {
  margin-left: 1.9rem;
}

.building .main .top1 > ul .active p {
  color: #dd292c;
  font-weight: 700;
}

.building .main .topActive {
  height: 2.54rem;
  background-color: #fff;
}

.building .main .tabs {
  padding: 0 0.3rem;
  margin-top: 1.78rem;
}

.building .main .tabs ul {
  display: flex;
  align-items: center;
}

.building .main .tabs ul li {
  font-size: 0.24rem;
  color: #666;
  margin-right: 0.4rem;
  position: relative;
  transition: all 0.3s;
  height: 0.4rem;
  text-align: center;
  line-height: 0.4rem;
  cursor: pointer;
}

.building .main .tabs ul .active {
  font-weight: 700;
  color: #000;
}

.building .main .data {
  padding: 0 0.3rem;
  margin-top: 1.6rem;
}

.building .main .data ul {
  display: flex;
  justify-content: space-between;
}

.building .main .data ul li p {
  font-size: 0.24rem;
  color: #000;
  font-weight: 700;
}

.building .main .data ul li p:first-of-type {
  color: #db272a;
  font-size: 0.36rem;
  font-family: Gilroy-Bold;
  margin-bottom: 0.1rem;
}

.building .main .data ul li p span {
  font-family: Gilroy-Bold;
  font-size: 0.72rem;
  display: inline-block;
  margin-right: -0.05rem;
}

.building .main .map {
  height: 7rem;
  margin-bottom: 0.5rem;
  margin-top: 0.6rem;
  position: relative;
}

.building .main .map > img {
  margin-top: 0.23rem;
}

.building .main .map ul {
  position: absolute;
  top: 0;
  left: 0;
}

.building .main .map ul li {
  display: flex;
  justify-content: center;
  align-items: center;
  position: absolute;
}

.building .main .map ul li .circle {
  border-radius: 50%;
  position: absolute;
  width: 100%;
  height: 100%;
  background: rgba(236, 84, 0, 0.3);
  animation: scale 2s linear infinite;
}

.building .main .map ul li:first-of-type {
  width: 1.43rem;
  height: 1.43rem;
  top: 0.47rem;
  left: 4.64rem;
}

.building .main .map ul li:first-of-type img {
  width: 0.54rem;
  height: 0.5rem;
}

.building .main .map ul li:nth-of-type(2) {
  width: 0.91rem;
  height: 0.91rem;
  top: 1.06rem;
  left: 5.59rem;
}

.building .main .map ul li:nth-of-type(2) img {
  width: 0.35rem;
  height: 0.32rem;
}

.building .main .map ul li:nth-of-type(3) {
  width: 0.75rem;
  height: 0.75rem;
  top: 2rem;
  left: 4.27rem;
}

.building .main .map ul li:nth-of-type(3) img {
  width: 0.32rem;
  height: 0.3rem;
}

.building .main .map ul li:nth-of-type(4) {
  width: 1.21rem;
  height: 1.21rem;
  top: 2.71rem;
  left: 3.5rem;
}

.building .main .map ul li:nth-of-type(4) img {
  width: 0.5rem;
  height: 0.46rem;
}

.building .main .map ul li:nth-of-type(5) {
  width: 1.71rem;
  height: 1.71rem;
  top: 3.6rem;
  left: 0.61rem;
}

.building .main .map ul li:nth-of-type(5) img {
  width: 0.67rem;
  height: 0.62rem;
}

.building .main .map ul li:nth-of-type(6) {
  width: 1.04rem;
  height: 1.04rem;
  top: 4.47rem;
  left: 1.66rem;
}

.building .main .map ul li:nth-of-type(6) img {
  width: 0.4rem;
  height: 0.37rem;
}

.building .main .map ul li:nth-of-type(7) {
  width: 1.77rem;
  height: 1.77rem;
  top: 3.5rem;
  left: 2.37rem;
}

.building .main .map ul li:nth-of-type(7) img {
  width: 0.7rem;
  height: 0.65rem;
}

.building .main .map ul li:nth-of-type(8) {
  width: 1.42rem;
  height: 1.42rem;
  top: 3.68rem;
  left: 3.72rem;
}

.building .main .map ul li:nth-of-type(8) img {
  width: 0.52rem;
  height: 0.48rem;
}

.building .main .map ul li:nth-of-type(9) {
  width: 0.98rem;
  height: 0.98rem;
  top: 3.68rem;
  left: 4.66rem;
}

.building .main .map ul li:nth-of-type(9) img {
  width: 0.37rem;
  height: 0.34rem;
}

.building .main .map ul li:nth-of-type(10) {
  width: 1.72rem;
  height: 1.72rem;
  top: 4.22rem;
  left: 5rem;
}

.building .main .map ul li:nth-of-type(10) img {
  width: 0.71rem;
  height: 0.66rem;
}

.building .main > ul > li {
  display: flex;
  flex-direction: column;
  margin-bottom: 0.5rem;
  cursor: pointer;
}

.building .main > ul > li .imgBox {
  width: 90%;
  height: 4.44rem;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  position: relative;
  margin: auto;
}

.building .main > ul > li .imgBox img:nth-of-type(2) {
  width: 0.9rem;
  height: 0.9rem;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.building .main > ul > li .content {
  padding: 0 0.43rem;
}

.building .main > ul > li .content .top .topLeft {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.4rem;
  margin-bottom: 0.25rem;
}

.building .main > ul > li .content .top .topLeft > p {
  font-size: 0.36rem;
  color: #000;
  font-weight: 700;
}

.building .main > ul > li .content .top .topLeft > div {
  display: flex;
}

.building .main > ul > li .content .top .topLeft > div p {
  font-size: 0.22rem;
  color: #000;
  display: flex;
  align-items: center;
  font-weight: 700;
}

.building .main > ul > li .content .top .topLeft > div p i {
  background-size: 100% 100% !important;
  width: 0.23rem;
  height: 0.23rem;
  display: inline-block;
  margin-right: 0.1rem;
}

.building .main > ul > li .content .top .topLeft > div p:first-of-type i {
  background: url(/src/assets/img/taoshu.png) no-repeat;
}

.building .main > ul > li .content .top .topLeft > div p:nth-of-type(2) {
  margin-left: 0.45rem;
}

.building .main > ul > li .content .top .topLeft > div p:nth-of-type(2) i {
  background: url(/src/assets/img/pingfang.png) no-repeat;
}

.building .main > ul > li .content .bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 0.29rem;
  padding-bottom: 0.53rem;
  border-top: 0.02rem solid #e7e7e7;
}

.building .main > ul > li .content .bottom .bottomLeft {
  display: flex;
  align-items: center;
}

.building .main > ul > li .content .bottom .bottomLeft .imgBox2 {
  width: 0.72rem;
  height: 0.72rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  overflow: hidden;
  margin-right: 0.29rem;
}

.building .main > ul > li .content .bottom .bottomLeft .text p {
  color: #000;
}

.building .main > ul > li .content .bottom .bottomLeft .text p:first-of-type {
  font-size: 0.22rem;
  font-weight: 700;
}

.building .main > ul > li .content .bottom .bottomLeft .text p:nth-of-type(2) {
  font-size: 0.26rem;
  font-weight: 700;
}

.building .main > ul > li .content .bottom .button-wrap {
  width: 2.16rem;
  height: 0.72rem;
}

.building .main > ul > li .content .bottom .button-wrap .btn {
  margin: 0;
  width: 2.16rem;
  height: 0.72rem;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 0.24rem;
}

.building .main .pagination-box {
  margin-top: 1rem;
  padding: 0 0.3rem 1rem;
}

.building .main .pagination-box .el-pagination {
  padding: 0;
}

.building .main .maskActive {
  opacity: 1;
  z-index: 1;
}

.building .main .video-popup .video-box {
  position: relative;
  display: flex;
  z-index: 11111;
  opacity: 1;
  background-color: #000;
}

.building .main .video-popup .video-box .close {
  position: absolute;
  z-index: 222222;
  top: -0.9rem;
  right: -0.1rem;
  width: 0.9rem;
  height: 0.9rem;
  border-radius: 50%;
  background-color: #dd292c;
  cursor: pointer;
  background-image: url();
  background-size: 0.3rem 0.3rem;
  background-repeat: no-repeat;
  background-position: 50%;
  transition: all 0.3s;
  transform: scale(0.6);
}

.building .main .video-popup .video-box .close:hover {
  background-color: #fff;
  background-image: url();
}

.building .main .swiper .swiper-slide {
  width: 80% !important;
}

.building .main .swiper .swiper-slide img {
  width: 100%;
}
.building .main .swiper .swiper-slide-active .imgBox {
  margin: 0;
  width: 100%;
}
.building .main .video-popup .video-box .imgBox {
  width: 7.5rem;
  height: 4.82rem;
  margin: 0 auto;
  pointer-events: none;
}

.building .main .video-popup .video-box .imgBox img {
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.building .main .mask {
  position: fixed;
  top: 0;
  bottom: 0;
  width: 7.5rem;
  background-color: rgba(0, 0, 0, 0.3);
  opacity: 0;
  transition: all 0.3s;
  z-index: -1;
}
.building .main .maskActive {
  opacity: 1;
  z-index: 1;
}
</style>